<div class="container" id="controller_orderlist" ng-controller="controller_orderlist">
	<div class="header">
		<div class="l-icon">
			<span class="i"><img src="../resources/images/logo_l.png" /></span>
			<span class="t">订单</span>
		</div>
	</div>
	<div style="height:46px;width:100%;"></div>
	
	<div class="order-list-wrap">
		<div class="order-types">
			<a ng-click="showOrderType('pay')" ng-class="orderType == 'pay' ? 'active' : ''" href="javascript:void(0)"><span>代付</span></a>
			<a ng-click="showOrderType('service')" ng-class="orderType == 'service' ? 'active' : ''" href="javascript:void(0)"><span>服务预订</span></a>
		</div>
		
		<div class="order-item-wrap">
			<!-- 代付订单 -->
			<div class="order-item orderlist-item" id="orderPay" ng-if="orderType == 'pay'">
				<div ng-if="orderlist_forPaying.length === 0" class="no-data-wrap">
					<div class="no-data-icon"></div>
					<span>未找到需要代付的订单</span>
				</div>
				<ul ng-if="orderlist_forPaying.length > 0">
					<li ng-repeat="item in orderlist_forPaying" ng-click="getOrderDetail(item.order_id, '')" ng-class="item.order_status == 'ORDER_O2O_STATUS_PAYING' ? '' : 'finish'">
							<div class="ava">
								<img ng-if="(item.icon == '' || item.icon == null) && item.sex == '2'" src="../resources/images/avator_f.png" />
								<img ng-if="(item.icon == '' || item.icon == null) && item.sex != '2'" src="../resources/images/avator_m.png" />
								<img ng-if="item.icon != '' && item.icon != null" ng-src="{{imagebasepath + item.icon}}" />
							</div>
							
							<div class="detail">
								<p><span class="n">服务名称&nbsp;:&nbsp;</span><span class="c" ng-bind="item.order_title"></span></p>
								<p><span class="n">下单时间&nbsp;:&nbsp;</span><span class="c" ng-bind="item.order_time | limitTo:16"></span></p>
								<p><span class="n">申请人&nbsp;&nbsp;&nbsp;&nbsp;:&nbsp;</span><span class="c" ng-bind="(item.user_name != '' && item.user_name != null) ? item.user_name : item.junci_code"></span></p>
							</div>
							<div class="r-a">
								<p class="pri" ng-bind="'￥' + item.sumMoney"></p>
								<span class="arr"><img src="../resources/images/a5.png"></span>
							</div>
							<div class="r-option">
								<a ng-if="item.order_status == 'ORDER_O2O_STATUS_PAYING'" href="javascript:void(0)" class="btn-pay"
								   ng-click="order_pay(item.order_id, item.exclusive_key);">去支付</a>
								<a ng-if="item.order_status != 'ORDER_O2O_STATUS_PAYING'" href="javascript:void(0)" class="btn-pay">支付已完成</a>
							</div>
							
					</li>
				</ul>
			</div>
			
			<!-- 服务预订的订单 -->
			<div class="order-item" id="orderService" ng-if="orderType == 'service'">
				<div ng-if="orderlist_byFamily.length === 0" class="no-data-wrap">
					<div class="no-data-icon"></div>
					<span>未找到预订服务的订单</span>
				</div>
				<ul ng-if="orderlist_byFamily.length > 0">
					<li ng-repeat="item in orderlist_byFamily">
						<div class="order-info o-h" ng-click="getOrderDetail(item.order_id, 'getOrderByFamily')">
							<div class="ava">
								<img ng-if="(item.icon == '' || item.icon == null) && item.sex == '2'" src="../resources/images/avator_f.png" />
								<img ng-if="(item.icon == '' || item.icon == null) && item.sex != '2'" src="../resources/images/avator_m.png" />
								<img ng-if="item.icon != '' && item.icon != null" ng-src="{{imagebasepath + item.icon}}" />
								<p ng-bind="(item.user_name != '' && item.user_name != null) ? item.user_name : item.junci_code" class="o-name"></p>
							</div>
							
							<div class="order-r">
								<div class="ite o-h">
									<div class="l f-l">
										<p class="shop-n" ng-bind="item.rev_organiza_name"></p>
										<p class="order-t" ng-bind="item.order_time | limitTo:16"></p>
									</div>
									<div class="f-r">
										<div class="order-s" ng-bind="item.order_status_name"></div>
										<div class="price" ng-bind="'￥' + item.sumMoney"></div>
									</div>
								</div>
								<div class="ite o-h">
									<div class="l f-l">
										<span class="order-se" ng-bind="item.order_title"></span>
									</div>
									<span class="arr"><img src="../resources/images/a5.png"></span>
								</div>
							</div>
						</div>
						<div class="opr f-r">
							<a href="javascript:void(0)" ng-if="item.isCancle === 'true'" ng-click="order_cancel(item.exclusive_key, item.order_id)" class="btn-canc">取消</a>
							<a href="javascript:void(0)" ng-if="item.isPay === 'true'" class="btn-pay" ng-click="order_pay(item.order_id, item.exclusive_key);">去支付</a>
							<!-- <a href="javascript:void(0)" ng-if="item.isRefund === 'true'" class="btn-pay">退款</a> -->
						</div>
					</li>
				</ul>
			</div>
		</div>
	</div>
</div>
<style type="text/css">
	body{background: #EFF2F7!important;}
</style>